
namespace HotFix
{
    using HHHFramework;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.U2D;
    using UnityEngine.UI;

    public class HeroUIView : BaseUI
    {

        //auto
        private Image heroLogoImg = null;
        private Text heroName;
        void Start()
        {

        }
        public override void Register()
        {

        }
        public override void UnRegister()
        {

        }

        #region 窗体的6种状态(生命周期)
        public override void IniForm()
        {
            heroLogoImg = transform.Find("HeroInfo/HeroLogo").GetComponent<Image>();
            heroName = transform.Find("HeroInfo/Name").GetComponent<Text>();
            LanguageMgr.Instance.Register<string>("T00001", (str) =>
            {
                heroName.text = str;
            });
            LanguageMgr.Instance.Register<Sprite>("T00002", (sprite) =>
            {
                heroLogoImg.sprite = sprite;
            });

            LanguageMgr.Instance.SendEvent<string>("T00001");
            LanguageMgr.Instance.SendEvent<Sprite>("T00002");
            base.IniForm();
        }

        /// <summary>
        /// 显示状态
        /// </summary>
        public override void ActiveTrue()
        {
            base.ActiveTrue();
        }

        /// <summary>
        /// 隐藏状态
        /// </summary>
        public override void ActiveFalse()
        {
            base.ActiveFalse();
        }

        /// <summary>
        /// 重新显示状态
        /// </summary>
        public override void ReActiveTrue()
        {
            base.ReActiveTrue();
        }

        /// <summary>
        /// 冻结状态
        /// </summary>
        public override void Freeze()
        {
            base.Freeze();
        }

        /// <summary>
        ///将该对象加入对象池
        /// </summary>
        public override void DestoryUIForm()
        {
            base.DestoryUIForm();
        }
        #endregion
    }
}